segfault at line 82 must be fixed