keep converting until error
comma
rework recursive magic function and use global temp
remove tmp