code refinement