simulator implementation