cleanup of discover