working on batch gradient descent