added token functionality