finished coding rnn.py