the choking algorithm