started socket functionality