Add comprehensions to convert wieght names and values correctly