Updated addition of ifelse control block