persisting todo items to db