Created public interface for the algorithm.