initial commit of common terms query with tests