code: def add(self, model):
          
          def foo(m, p, i):
              if m[i][0].name == model.name:
                  raise ValueError("Model already exists")
              return
          # checks if already existing
          self.foreach(foo)
          
          self.append((model,))
          return
docs: raises an exception if the model cannot be added