save before major modification
adding valgrind support