add minibatch support for adagrad