began implementing new gradient method