the update function button now properly works