add subsitution variation calculation