added helper functions for edges