more factoring, starting implementation of lin-reg end node model