moving around the index lookups to the reducer