added has_graphs & graphs functions