singleton, directory refactoring