changed variable name away from i to fix issue with
prev_selected_neighborhood_index being set to the wrong thing