first version
least squares working
plots gravity