added emulation mode