get tasks function complete