modified rnnlm.scala