using fnmatch to allow the use of the wildcard operator in queries, also using import from in the hope that it improves performance (need to do more testing to confirm)