Final changes on TB -> adding new perl script function