fixed to correctly find pipes and or