modify to add test for If statement