improve resetDb