changed formatting
shorted if syntax