refactored updateG to return f(x) for use in accepting/rejecting x, also changed generatePoints to update glist