minor nit: this would be a little easier to read if you said `i !== 0`