add another couple of functions for ts codes