fixed initialization stuff with valgrind but still leaking :-(