code reffactor