working to reduce memory use