refine boundary