simulator initial code