implement two versions of update data