working on END_IF problem