moved JS into token.js