removed redundant logical test