adding simple if-then-else blocks