removed unused i variable