I refactored to use a map instead of an agent and it confirmed your suggestion. The result was over 3 times faster. Thanks!