removed extra brackets around if