refract some code