Integrate everything. added weijie's and my part