socket finally working