finished boosting the memory. version for valgrind run