Added function for simulations