Don't name local variables by 'index' to prevent 'declaration shadows global' warnings