COndensed the if-then block even further