Katas refactor