ourAlgorithm