refractored 2