refine parsing retry mechanism