Could you add a latex description of the maths behind the method here?