token generation modified