exercise concerning valgrind