included alglib for least squares functionality