seg fault fixed, thanks to valgrind, fuck the bug