added valgrind comments to understand memory allocation.