Added i2f function and removed some debugging prints