Added socket handler