Reworking of Corners Algorithm