advanced and mem1
advanced and mem1, cleanup