use dynamic db connection instead of DB constant