add option to clear the index