ifelse(and if) is done