cleaning up the index