make random variables formal classes
convert logp references to logpt and logpc to fastlogp