upgrade and simplify