adding "pattern-<name>" class to every element pattern is initialized on