refactored
removed unnecessary else