added function getHops to get all hops from repository