implemented linfact and transfact