trying to get memory use under control