Component algorithm.