added moving least squares