optimises memory use and lots of other