added support for multiple db connection