valid path generation