added queries for term and legislator including compares on dates and names