refactor token part