made edge determination more direct, updated UML