initial code for creating complex recurrent networks