Move to_i to post-processing of the ternary