Added if-then-else support