first direction loop works