added some physical memory management