refactored path_weights