improve memory usage.