added token function