added clear button functionality