changed the data.simulation.function so it produces csem as well as simulated data