fixing a bug with the todo database insertions. still needs to be fixed as currently everything isn't being pushed into the array; still works despite this