Sort by weights.