Small improvement

More idiomatic, and possibly a speedup of a millisecond or two