functioning code.

make sure time is increased 2000000 works