finish gradientDescent