Cleaned up comments made seperate method for undirected k