rewrote mmu handling