implemented updateAvgLearnedSeqLength()
added fillrow function
implemented inferPhase1()
implemented inferBacktrack()