A modification of https://github.com/vicsstar/funnel