moved funnel into main module