different approach, all tests passed for 1, 5, 7 and 10