added ability to specify port in url