add functions to allow host communication over tcp
add godoc comments
go fmt