Pretty please use `Integer(...)` instead of `.to_i`... unless you're counting on non-numbers becoming zero (possibly?).