adding the object to the view