refactor, add Db