add strtox, rearrange a little bit.