Added extraction algorithm.