refactoring kitty