Fixing connection function
Fixing connection function
Fixing connection function
remove debugging code for connection function
updated deprecated method