moved extending token to ui thread