updating wagon functions