removing extra if