Make reference to given graph instead of passing it as argument