attempt to improve memory use