added some more graph functions