code refinements