cardtypes graph functional