conversion of weights from string into float