added simulated and real version