finished writing build_all_tableaux but needs optimization