removed redundant if