Working code - added khop by edge labels. not okay for direction=both