socket implementation in progress