refactoring and using local files only