IF ELSE nesting removed