all tests passing. now for a tidy up