reduce codes, make clear button