almost completed memory table setting