use tasks array in buildAgenda