Added support for multiple db connections