working with valgrind from http://c.learncodethehardway.org/book/ex4.html