add tasks to an ordered list and to an array