corrected the value returned by edit_length_metric, the name of the function should probably change as well though