added valgrind tests