sorting by port numbers