2 other variants of how to implement the core part