shared concerns for token generation