Naive non-OO lesson 3 implementation