started optimising lookup speed on map
working on rake tasks