Finished solution for Kata 3.