if else while handling