use one helper function to common itoa and utoa