the if-else statement works now