Almost there, it doesnt Segfault anymore