fix up gradient descent mostly
add wrapper for gradientdescent