add clear button and function for log