Pyarch path computation moved to a function