Processing tasks into a map