modfied to use the default internal endpoint.