added indexeddb to save cached activities