make todoItems collection a global variable to fix bug where todoItems were being added to previous collection instead of the current collection