refactoring the legacy wrapper to a singleton