collect results and then merge