Changed modify method to throw exception when duplicated.