tidy up of unused code