Refactoring flip