made max memory an attribute