renamed customDomain to endpoint, fixed #6