added mode and token can be updated