adds object to the controller