emulator written in python3: init