copied from mock cartridge