added least squares estimate