refactored path concatenation