better logging
assign sequential port numbers
add some doc