Added code for if statements