adjusted if statements

adjusted if statements, narrowed the problem to the else statement