remove redundant logic