connection to external db