added more functionality to add objects to another object in the
database