Added runtime functionality to graph search in main.cpp