updated to get rid of index