Finished implementing phase1