extract token generation into concern