starting refactoring of Edge class