fixing problems with calculate_possibilities