test DB code