finish the emulator part