Algorithm implemented.