added method for deleting an attachment