refactoring: delete if