refactored way the TC loops
added alternative way to print tasks