matrix emulation