tidying up and removing copying