refine to a better way