added broken_mode option to get_cumulative_weights