Finalized solution for kata 1