added rough update function

added a fairly generic DB update function using json for encapsulation.