use ruby native to_i instead specific integer conversion