refined codes