move code to indexers