refine code block