Changed the ordering of the 'if' statement in Steps 3-4