changed onUpdate to poll no more than once per second