made few changes to conditional statement

made few changes to conditional statement still not working properly