improve bb_list and add doctest