adding getPath/getPathLength implementation