remove unneccessary `to_i`s and `to_f`s