needle in the haystack problem solved