Use extracted getTaskAt method