add tasks function