clean up for main file of sampler