Works well, but recomputes edges