clean up and simplify, rename