some refactoring, add pathFor and go