update doc
fix bug in random_token function