added toInt cast function

pls add number to int test here