some changes to the kernel functions and computations after reading muller paper
some changes to scaling