segfault but getting test working