memory leaks reduced. about run with valgrind