adding query position extraction and capitalized pig keywords