shortened db test code