made pathlength own script