slight optimisation (13 -> 9 seconds)