clean up and simplify