properly modify instead of add

will now choose either modify or add depending on whether the object is
new or old