simple pattern search