adding valgrind test correctly