if-then-else without {}s. some cosmetic changes