correcting addedobject declaration