Added opening if statement