decode strings to ints