Making the path generation work