simplify and eliminate warning