added socket utilities