functions for timing out TM added - todo: implement