fully define cast_integer