added trinity to assemble, improved pipeline logic