choking algorithm done