update with db provider & inserting logic