rewrite itoa and add xtoa