Refacto for patterns