removed redundant if conditions