added filter on sqlite database for most recent version of a domain and added a default for domains that are not in the db