added clearmem template