refactored edge prototype