Adding edges functionality