added regs and main mem