maybe better reading from socket