removed tcounter variable