writing buddy system dynamic storage llocation. NEEDS DEBUGGING.