added brackets for if statements.