revision for socket communication