Added method to Path to return weight