make registry implementation an anonymous class