use memset() to eliminate valgrind's warnings