getting nearer to the final version!
fixing way edges are created