testing destructor to test valgrind