modify index and delete samples