Implement cascading algorithm.