Moved functionality of set to pattern set class