loop works now