clear button logic