transform str labels to numeric