added gradient descent method and test file