added functionality to give pattern group a new name