added basic behavior to recurrent net with gates