updated refractored