smarter clear-button