example using simulation