utility function for MT