rework and clean up