emulator implemented