added some things to tidy up