changes to controller for destroying docs