Implemented phase 1