microoptimisation. ~10% speedup