gradDesc implemented on backprop with function tools