some tidy up work