reordered data structures; removed mainMemory array and changed it to a pageTable array; tested the simpliest case. IT WORKS