added solution for trace tool with indentation