code rafactor