changed to_d to to_i