Implemented phase 2