some memory using optimisation