added doc paramter to query