ref searching for available ports