Refactoring (if)