Added more math from private repo