refract code