creates batches for consumption by rnn