Updated if and endif