modified port selection strategy