Kata 8,9,10 solution