refactored to use new TPath API