More attempts at solving a mem prob