update function didn't save