Added updateImmediately and updateInterval logic