first version of standard lagrange interpolation, which is not working