Application loop works