removed unused variable tr