added template version of itoa