initial integration with gradient descent