introduce resource to get edges rather than hard-coded in controller