fix db connection useage method