updated the if-else exercises to pass the mocha tests