remove unnecessary socket connection code