added code for simulating datasets