Implement location.path logic with mentor