move var phase out of update loop