Path Record algorithm sceleton implementation