Refactoring: Separate function to make path