implement one stage if-else