renamed the factory registration method, improved comments