Implemented gradient descent and added one example function