tidy up for tm