Program including simulations

next step, clean the program and improve the loop for simulations