testing graph functions