refactor to move term_limit wholly into Query class