allowing port number to be supplied as argument