added support for differnt lms and started support for factored models