TJ: functions.