add token generation method