working; next need to clean up valgrind report