minor changes in style of if-statement