update by LJW for update logic of step2