My algorithm.