add a tool code for progress showing