refactor socket payloads