ENH: enhanced the way the transfer matrix is built