initialize the code of simulator