revised trace processing to increase readability and fix errors with lengthy srai chains