removed  ylim=c(-20,0) from plotg function
added ability to pass lower and upper bounds into main, also changed grad method to 'simple'