fixed if statement brackets