make convert return bool
add some checks