cell updating loop