port 0 is not allowed
add function prefix
add comments