added mem.h and 354 code