fixup! added toInt cast function