commented out tm function