modified tool index controller to work with json