Refactor to use function for adding TP comment