cleaning the index