connecting to remote db