revamping code
updating waterfall