task and alarm function all done except for  connecting with indexDB