changed graphcolor to take in K as parameter