removed redundant conditions