Nits: move declaration to top of method; rename var.