refactoring potato