redesigned get_all_adhocs().