tr finished, works as intended

tr is finished and tested.