updated mem.c changed head pointer