removed redundance if clause