adding socket handler