Set up function to convert strings to numbers.