extra endif deleted