removed unused loop counter