works, but fails unpleasantly when no result found
-rwxr-xr-x 1394 patent.py