fetch tasks from db