made peanoToNum tailrecursive