convert to numeric labels