added a free function next_combination