Well, OK, you want to go 40mph.
I'll tell you about my bike, 66cc ,My mods consist of, polished head dome, notched cylinder skirt, wide intake pipe, ported exhaust and trimmed gaskets also trimmed gaskets in transfer ports.
I use Echo powerblend 2 stroke oil (I have Opti2 I haven't tried yet)
Ehh.. what else....
44 tooth sprocket.
On a flat I hit 58kmh or 36mph, but on a slight 2Degree slope up to 63kmh or 39mph or with a 70kmh wind behind me
I am keeping my 44 tooth as I live in a hilly area, but if you went down in teeth and with a 29" wheel you should be able to hit those speeds (my guess) But you'll have less torque.
And believe me pal, those speeds are scary on a bicycle! You'll be happy even if you don't reach 40mph.
I'm 6'2' and 170+- lbs