refine codes update