Changes to inscribing algorithm