algorithm applied