A bit of optimisation