eliminate usless logic