nesting if statements wrong

using separate if statements