add memory region related stuff
invoke test function
refactor for short lines
begin memory management related work