Merged 3 getTasks into 1, working on the same idea for submitTasks