ADD PC algorithm draft implementation. Orient edges is missing one stage.