fixed to_i problem