Algorithm implemented