refactoring PathElement class