first attempt at implementing indexedDB complete