created clear button and functionality