fiddling with db connection -- connected? and side effects