add [] method in edges