added different templates for registering different types