fixed tiny bug in mem1, added altmem2