add the stock tool code