Refactoring for path