init the socket the right way