gradient descent implemented, added adagrad