simulator initial code, just code skeleton