changed to reference emulator, emulator test added