refactor todo-app to use db storage