Added ability to connect, still lacks proper error handling