refactor registry code to use managers