pipeline reworked, still need some more tweaks