it's done, and a bit cleaned up