add clear button and make the tool bar work