wrapped db in env cond