add token + resolved some bugs