minor optimisation of code