removed redundant logic check