updated gradient_descent.cpp