Waterfall layou funciton
Merge pull request #11 from fengliu222/master

waterfall layout function