getPendingTasks() implementation