main for task Tree