fixup! added toInt cast function
rewrite implicit casts to new concrete cast functions