memory optimizatioin.