replaced old version of main.cpp
updated valgrind log