cleaned up getPort method