tidy up and re-organize