add cancel and set tool along with path refactor