reorganized some code, working on rntn model now.