unnecessary new lines removed between if statements