refactored useless check