Updated
update function to support our back end