reworked pipeline into single matrix, so much faster