remove sse() function from levenberg_marquardt for increased speed and simplicity