nit: use `let` instead of `var` where applicable