my code worked - I think I used proper TDD technique, but code review suggests I need to work on loop