First version of converting strings to numbers