refracting code