modified temporary db connection