added new features to tms analysis