defregistry also defines function to register multiple handlers at once.