fix bug
add math helper to reuse base conversion