added brackets to conditionals