added support for new minibatch scheme to mnist example