finalized code for simulation 1
updated simulation 2
copied basic code for simulation 3