correcting conditional statement