update all_paths to take correctly evaluate case 2