adds query to map_reduce