using update function to pass variable to TimedStates