why wont 3rd condition satisfy ? the code runs correctly