Update: codewars solution1