recurrent layer with search and language model class added