improve token generation