port improvement to non-empty graph representation