added hook for lmtrain