update if and else

update if and else