document waterfall and whilst