refine sample