refine validation