it's no longer segfaulting, but now I'm getting a blank matrix out