added better hole-filling for graphs