refactor into reusable helper frunction PortIsListenedOn()