when compete and delete, do it on indexedDB first