added ability for the server to search for an available port