implement onmessage (nb. still figuring out how d3 wants to be used ... )