adding difference coding to first edge