updated with localforage usage