refactored if statements