Modified graph class to return neighbors by parameter reference