Improvement on the Naive Pattern Search.