how to implement a case tool

follows