cleaned up indexing