works with local db including put and get document