add -Wconversion option
add sharper precondition to allow safe conversion

from unsigned int to int