updated test and modified to allow for txt file input format of graph for ease.