use key values rather than nominal position in pseudo-array, from contri...

...bution of pull request #137, consider further refactor of this._agents to a proper array