started on simulation code