collect samples at the end