finish graph load function