Added edges function.