Implemented change in mem layout