refractored2pattern