vast improvement in the simulation part

a much better simulation part is added