working TaskAnalysis code(with ADJLIST)