cleaned up indexing helpers