Removed redundant variables trnum and tsnum