last ugraph function