abstract out edge length type