naive implementation of a correlation search algorithm