implement the hash based search
fix bug with hash search and pattern file