RRW coding. Overhanging curves implementation