delete index functionality