add createPathExpression and restructure