typefamily to specify graph