a few codes related to graphs