seg fault: fac_dim, fp is laughing