hand-written for loop works with everything but assignment as init