Added f2i and i2f functions