added a function to retrieve the neighbours of a vertex