make it possible to pass a name to register_class