registering endpoint