convert strings to correct types