add socket encapsulation temporarily