edge direction added