add support for updating todo, fix bug in db/delete