Added emulator functionality