finished optimizing the memory!