optimisation improvements