update socket functionality