made the if-else blocks