reduce the memory usage