Add functions for waterfall