Implemented phase2