Added selection and minibatch selection.