added ifelse stmt support