implemented phase1