Added misc functions for simulating data