simplified edge length comparison