redone pt matrices, needs more adjustments. Version below is a working
version sans triplet likelihood