added port selection for server