update moving logic