bug fixed: update method now also updates json