$apply command for update