created if and else condition

created if and else condition