preparation of dataset for RNN