Edit Routing Algorithm