adds brackets around if