complete, though relatively untested, rework